import Vue from 'vue'
import Router from 'vue-router'
Vue.use(Router)
import HomeContainer from "../components/HomeContainer.vue"
import MemberContainer from "../components/MemberContainer.vue"
import ShopcarContainer from "../components/ShopcarContainer.vue"
import SearchContainer from "../components/SearchContainer.vue"
import NewsList from "../news/NewsList.vue"
import NewsInfo from "../news/NewsInfo.vue"
import PhotoList from "../photo/PhotoList.vue"
import PhotoInfo from "../photo/PhotoInfo.vue"
import ForgetPsd from "../components/ForgetPsd.vue"
import RegisterContainer from "../components/RegisterContainer.vue"
import GoodsList from "../goods/GoodsList.vue"
import GoodsInfo from "../goods/GoodsInfo.vue"
import GoodsDesc from "../goods/GoodsDesc.vue"
import GoodsComment from "../goods/GoodsComment.vue"
import FeedbackContainer from "../components/FeedbackContainer.vue"
import settingContainer from "../components/settingContainer.vue"
import account from "../components/account.vue"


//导入对应的路由组件

export default new Router({
  routes: [//配置路由规则
    {path: "/" ,redirect: "/home"},
    {path: "/home" , component:HomeContainer},
    {path: "/member" , component:MemberContainer},
    {path: "/shopcar" , component:ShopcarContainer},
    {path: "/search" , component:SearchContainer},
    {path: "/home/newslist" , component:NewsList},
    {path: "/home/newsinfo/:id" ,component:NewsInfo},
    {path: "/home/photolist" , component:PhotoList},
    {path: "/home/photoinfo/:id", component:PhotoInfo},
    {path: "/search/forgetpsd" ,component:ForgetPsd},
    {path: "/search/registercontainer" ,component:RegisterContainer},
    {path:'/home/goodslist',component:GoodsList},
    {path:'/home/goodsinfo/:id',component:GoodsInfo,name:'goodsinfo'},
    {path: "/home/goodsdesc/:id",component:GoodsDesc,name:"goodsdesc"},
    {path:"/home/goodscomment/:id",component:GoodsComment,name:"goodscomment"},
    {path: "/home/feedback",component:FeedbackContainer},
    {path: "/search/seeting", component:settingContainer},
    {path: "/search/account",component:account}
  ],
  linkActiveClass:" mui-active"//覆盖默认的路由高亮的类，默认叫做router-link-active
})
 